package com.bfly.mall.wechat.enums;

/**
 * 公众号素材类型
 *
 * @author 长沙商脉科技有限公司
 * @date 2021/1/6 15:36
 */
public enum WeChatMpMaterialEnum {

    IMAGE("图片", "image"),
    VOICE("语音", "voice"),
    VIDEO("视频", "video"),
    NEWS("图文", "news");

    private String name;
    private String type;

    WeChatMpMaterialEnum(String name, String type) {
        this.name = name;
        this.type = type;
    }

    public static WeChatMpMaterialEnum getMaterialType(String type) {
        for (WeChatMpMaterialEnum status : WeChatMpMaterialEnum.values()) {
            if (type.equalsIgnoreCase(status.getType())) {
                return status;
            }
        }
        return null;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
